package com.ai3d.rfid.network.abnormal

/**
 *  Enum class for Errors
 */
enum class Error(private val code: Int, private val err: String) {

    /**
     * unknown error
     */
    UNKNOWN(1000, "请求失败，请稍后再试"),
    /**
     * parse error
     */
    PARSE_ERROR(1001, "解析错误，请稍后再试"),
    /**
     * network error
     */
    NETWORK_ERROR(1002, "网络连接错误，请稍后重试"),

    /**
     * SSL Certificate error
     */
    SSL_ERROR(1004, "证书出错，请稍后再试"),

    /**
     *connection time out error
     */
    TIMEOUT_ERROR(1006, "网络连接超时，请稍后重试");

    fun getValue(): String {
        return err
    }

    fun getKey(): Int {
        return code
    }

}